<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
  <title>学生学业课程成绩</title>
  <!--link-->
  <link rel="stylesheet" href="../../lib/icon/fontawesome-free-6.4.0/all.css">
  <link rel="stylesheet" href="../../lib/bootstrap-5.1.3-dist/css/bootstrap.css">
  <link rel="stylesheet" href="../../lib/weui/weui.css">
  <link rel="stylesheet" href="../mycss.css">
  <script src="../../lib/jquery/jquery-3.6.1.js"></script>
  <script src="../../lib/axios/axios.js"></script>
  <script src="../../util/httpRequest.js"></script>
  <script src="../../util/myutil.js"></script>
  <script src="../../lib/vue/vue.js"></script>
</head>
<body data-weui-theme="light">
<div id="root" class="container">
  <div v-for="item in spmScoreList">
    <div class="card" style="margin-bottom:1rem">
      <div class="card-header text-center">
        {{item.academicyearname}}{{item.termname}}
      </div>
      <table class="table table-bordered table-striped" style="margin-bottom:0">
        <tr>
          <td>课程/环节</td>
          <td>类别</td>
          <td>学分</td>
          <td>成绩</td>
          <td>课程学分绩点</td>
        </tr>
        <tr v-for="courseScore in item.courseScoreList">
          <td>{{courseScore.coursename}}</td>
          <td>{{courseScore.coursecategory}}</td>
          <td>{{parseFloat(courseScore.credit)}}</td>
          <td>{{parseFloat(courseScore.score)}}</td>
          <td>{{courseScore.creditgpa}}</td>
        </tr>
      </table>
    </div>
  </div>
</div>
<script>
  const vm = new Vue({
    el:'#root',
    data:{
        spmScoreList:[
          {
            academicyearno:'',
            academicyearname:'',
            termno:'',
            termname:'',
            courseScoreList:[]
          }
        ]
    },
    methods: {
      verificationObj(key) {
        return verification(key)
      }
    },
    mounted(){
      http({
        url:'/third/spm/stuSpmScoreList',
        method: 'get'
      }).then(response => {
        console.log(response.data)
        if (response.data.code === '200' ){
          this.spmScoreList = response.data.stuSpmScoreList.spmScoreList
        }
      })
    }
  })
</script>
</body>
</html>